import { ref } from 'vue'
import { findBanner } from '@/api/home.js'

// 调用这个函数 获取轮播图
const useBanner = () => {
  const bannerList = ref([])
  async function getBanner() {
    const res = await findBanner()
    bannerList.value = res.result
  }
  getBanner()
  return bannerList
}
export { useBanner }
